package com.maila.sdk.demo;


import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;

import com.duiba.maila.sdk.GuidePageView;

public class MainActivity extends AppCompatActivity {

    private GuidePageView mGuidePageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mGuidePageView = (GuidePageView)findViewById(R.id.pageView);
        mGuidePageView.showGuidePage("https://m.maila88.com/mailaIndex?mailaAppKey=B66cMvqzZsKw3snexwbYWC");
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if (mGuidePageView.canGoBack()) {
            mGuidePageView.goBack();
            return true;
        }
        return super.onKeyDown(keyCode, event);
    }

}
